home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 138
/
138.d81
/
b.rr convert
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
7KB
|
181 lines
50 poke53281,0:poke53280,0:print"[147]":gosub60000:fort=0to3000:next
60 poke53280,15:poke53281,15:poke646,0
80 sp$=""
100 print"[147]"chr$(142):q$=chr$(13)
110 br$=" [144] "+sp$+sp$+" [146]
120 mr$[178]" stop"[170]sp$[170]" model railroad conversions stop "[170]sp$[170]"wait ":hr$[178]br$[170]mr$[170]br$
130 g$[178]" stop"[170]sp$[170]" g - lgb - 1/22.5 scale stop "[170]sp$[170]"wait
140 o$=" [144]"+sp$+" o - lionel - 1/48 scale [144] "+sp$+"[146]
150 s$[178]" stop"[170]sp$[170]" s - american flyer - 1/64 scale stop "[170]sp$[170]"wait
160 h$=" [144]"+sp$+" ho - 1/87 scale [144] "+sp$+"[146]
170 n$[178]" stop"[170]sp$[170]" n - 1/120 scale stop "[170]sp$[170]"wait
180 z$=" [144]"+sp$+" z - 1/220 scale [144] "+sp$+"[146]
190 w$[178]" stop"[170]sp$[170]" weight conversion stop "[170]sp$[170]"wait
200 t$=" [144]"+sp$+" grade calculation [144] "+sp$+"[146]
210 gc[178].5:oc[178].25:sc[178].188:hc[178].138:nc[178].075:zc[178].055:gd$[178]"what is the % of grade
220 ht$="rise height [ in inches ]":lt$="length of grade [ in feet ]
230 mt$[178]" minimum turnout - # 6":tk$[178]"track center distance -
240 ra$=" minimum radius - ":rc$=" recomended -
250 pr$[178]" prototype - ":th$[178]" overhead clearance -
260 sa$=" scale track and rail data (min)":ou$=" ounce":oz$=" ounces
270 in$[178]" inch ":im$[178]" inch min":up$[178]"onononononononononon":sk$[178]sa$[170]q$[170]tk$
280 ih$[178]im$[170]q$[170]th$:ia$[178]im$[170]q$[170]ra$:ic$[178]in$[170]q$[170]rc$:ir$[178]in$[170]q$[170]pr$:it$[178]in$[170]q$[170]mt$
290 cw$[178]" car weight in ounces - ":cl$[178]q$[170]" plus 1/2 oz for each inch of car length
300 cm$=q$+" plus 1/4 oz for each inch of car length
310 co$[178]q$[170]" plus 1 oz for each inch of car length":nd$[178]"no data yet
320 s2$="o":s3$="s":s4$="ho":s5$="n
360 [153]"load"hr$q$" select"q$" 1) g - lgb - scale feet"q$
370 [153]" 2) o - lionel - scale feet"q$" 3) s - american flyer - scale feet"q$
380 [153]" 4) ho - scale feet"q$" 5) n - scale feet"q$" 6) z - scale feet"q$
390 [153]" 7) weight conversion"q$" 8) grade calculation"q$" 9) quit wait
400 getr$:ifr$=""then400
410 r=val(r$)
420 onrgoto440,450,460,470,480,490,500,1310,1600
430 goto400
440 tl$=br$+g$+br$:cv=gc:goto540
450 tl$=br$+o$+br$:cv=oc:goto540
460 tl$=br$+s$+br$:cv=sc:goto540
470 tl$=br$+h$+br$:cv=hc:goto540
480 tl$=br$+n$+br$:cv=nc:goto540
490 tl$=br$+z$+br$:cv=zc:goto540
500 tl$=br$+w$+br$:goto820
540 print"[147][145]"tl$q$" select type conversion"q$" 1) full size to scale [ in feet ]"q$
550 print" 2) scale to full size [ in inches ]"q$" 3) return to main menu "q$
560 print" press[146] _ for rail data"q$
570 geta$:ifa$=""then570
580 ifa$="_"ora$="^"ora$="="thenonrgosub1790,1670,1700,1730,1760,1790:goto540
590 ifa$="3"ora$=chr$(13)then360
600 a=val(a$):ifa<1ora>3then570
610 un$="":input"unit:";un$:un=val(un$):ifun=0then540
620 ifa=1thenvn$="feet
630 [139]a[178]1[175]un[178]1[167]vn$[178]"foot
640 ifa=2thenvn$="inches
650 [139]a[178]2[175]un[178]1[167]vn$[178]"inch
660 print"[145]"tab(((30+len(un$))/2)-3)vn$:printq$"converted it's:
670 [145]a[137]680,720
680 am[178]cv[172]un:io$[178]" inches wait or":fe$[178]" feet wait":[139]am[178]1[167]io$[178]" inch wait or
690 ft=am/12:am$=str$(am):ft$=str$(ft)
700 ifam<.01thenprint"too small for proper calculation[146]":forx=1to1750:next:goto540
710 printq$left$(am$,7);io$left$(ft$,6);fe$:goto760
720 am=un/cv:fe$=" feet [146] or":io$=" inches [146]":ifam=1thenfe$=" foot [146]
730 [139]am[179].01[167][153]"too small for proper calculationwait":[129]x[178]1[164]1750:[130]:[137]540
740 ft[178]am[172]12:am$[178][196](am):ft$[178][196](ft)
750 [153]q$[200](am$,7);fe$q$""[200](ft$,6);io$
760 [153]" press any key to continue wait
770 geta$:ifa$=""then770
780 goto540
820 print"[147]"tl$q$" select type conversion"q$" 1) car weight vs length"q$
830 print" 2) grams to ounces"q$
840 print" 3) ounces to grams"q$" 4) return to main menu "q$
850 geta$:ifa$=""then850
860 ifa$="4"ora$=chr$(13)then360
870 a=val(a$):ifa<1ora>4then850
880 ifa<>1then1200
890 oz$=" ounces":gm$=" grams":r=0:r$="
900 [153]"loadselect scale"q$" 1) g - lgb - "q$" 2) o - lionel -
910 print" 3) s - american flyer -"q$" 4) ho - "q$" 5) n - "q$
920 print" 6) z - "q$" _) go back to previous menu [146]"q$
930 ifr=6orr=1then950
940 ifr>0then960
950 getr$:ifr$=""then950
960 r=val(r$):o2=5:s3=2:h4=1:n5=.5
970 ifr<1orr>6thengoto820
980 ifr=2thensu$=s2$:goto1040
990 ifr=3thensu$=s3$:goto1040
1000 ifr=4thensu$=s4$:goto1040
1010 ifr=5thensu$=s5$:goto1040
1020 ifr=1orr=6thenprint""nd$" press any key to continue: [146]":gosub1810
1030 goto900
1040 cl=0:cl$="":print"length of "su$;:input" [146] car [in inches]";cl$
1050 ifcl$="_"then820
1060 cl=val(cl$):ifcl=0then900
1070 ifr=2thentw=cl*1+o2:goto1110
1080 ifr=3thentw=cl*.5+s3:goto1110
1090 ifr=4thentw=cl*.5+h4:goto1110
1100 ifr=5thentw=cl*.25+n5:goto1110
1110 wg=tw*28.35
1120 print""tw;oz$" or ";wg;gm$
1130 ll$=" [164][164][164][164][164][164][164][164][164][164][164][164]
1140 [153]ll$q$" press - return - wait to recalculate
1150 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]
1160 [153]" press any key to return to main menu
1170 getx$:ifx$=""then1170
1180 ifx$=chr$(13)then900
1190 goto820
1200 un$="":input"unit:";un$:un=val(un$):ifun=0then820
1210 ifa=2andun=1thengm$="gram":goto1230
1220 ifa=3andun=1thenoz$=ou$
1230 print"converted":onagoto820,1240,1250
1240 am=.0353*un:printq$un;gm$" ="am;oz$:goto1270
1250 am=28.35*un:ifam=<1thengm$="gram
1260 [153]q$un;oz$" ="am" "gm$
1270 [153]" press any key to continue: wait
1280 geta$:ifa$=""then1280
1290 goto820
1310 rem
1330 print"[147]"br$+t$+br$:lg=0:rh=0
1340 print"[145]"q$" select type conversion"q$" 1) find % of grade"q$
1350 print" 2) find length of grade"q$" 3) find rise height"q$
1360 print" 4) return to main menu [146]
1370 [161]a$:[139]a$[178]""[167]1370
1380 a[178][197](a$):[145]a[137]1400,1450,1470,360
1390 [137]360
1400 [153]lt$;:[133]lg:[153]ht$;:[133]rh:[139]rh[178]0[176]lg[178]0[167]1330
1410 gc[178]rh[173](lg[172]12)[172]100:gc$[178][196](gc):[139]gc[179].010[167][137]1440
1420 [139]gc[177]50[167][153]"more than 50% gradewait":[129]t[178]1[164]1750:[130]:[137]1330
1430 [153]""[200](gc$,5)[170][199](37)[170]" grade":[137]1520
1440 [153]"less than .010 % gradewait":[129]t[178]1[164]1750:[130]:[137]1330
1450 [153]gd$;:[133]gc:[153]ht$;:[133]rh:[139]gc[178]0[176]rh[178]0[167]1330
1460 lg[178](rh[172]100)[173]gc[173]12:lg$[178][196](lg):[153]""[200](lg$,5)" feet":[137]1520
1470 [153]gd$;:[133]gc:[153]lt$;:[133]lg:[139]gc[178]0[176]lg[178]0[167]1330
1480 rh[178](lg[172]12)[172](gc[173]100):rh$[178][196](rh)
1490 [139]rh[179]12[167][153]""[200](rh$,5)" inches":[137]1520
1500 [139]rh[177]12[167]rf[178]rh[173]12:rf$[178][196](rf)
1510 [153]""[200](rh$,5)" inches or "[200](rf$,5)" feet
1520 ll$=" [164][164][164][164][164][164][164][164][164][164][164][164]
1530 [153]ll$q$" press - return - wait to recalculate
1540 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]
1550 [153]" press any key to return to main menu
1560 getx$:ifx$=""then1560
1570 ifx$=chr$(13)then1330
1580 goto360
1600 goto40000
1670 printup$"o"sk$" 5"ih$" 5 1/2"ia$"36"ic$"48"ir$"60"it$
1680 printq$cw$"5"oz$q$co$
1690 gosub1810:return
1700 printup$"s"sk$" 3 3/4"ih$" 4 1/8"ia$"27"ic$"36"ir$"45"it$
1710 printq$cw$"2 "oz$q$cl$
1720 gosub1810:return
1730 printup$"ho"sk$" 2 1/2"ih$" 3"im$" "q$ra$"18"ic$"24"ir$"30"it$
1740 printq$cw$"1"ou$q$cl$
1750 gosub1810:return
1760 printup$"n"sk$" 1 1/2"ih$" 1 1/2"ia$" 9"ic$"12"ir$